package org.zw.android.framework.http;


/**
 * Error Filter
 * 
 * @author zhouwei
 *
 */
public abstract class FilterException extends BaseFilter implements FilterResponse {
	
	@Override
	public boolean doFilter(HttpRequest request, ResponseBean bean,HttpUIHandler uiHandler) {
		
		attachUiHandler(uiHandler);
		attachObject(request,bean);
		
		Exception e = null ;
		
		if(bean != null && bean.getResponse() != null){
			e = new Exception(bean.getResponse());
		}
		
		return doException(e);
	}
	
	public abstract boolean doException(Exception e) ;
	
}
